package com.java.ThreadDemo2;

public class MyRun implements Runnable{
    //要执行的线程代码
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            //获取当前线程的对象
            Thread t = Thread.currentThread();
            System.out.println(t.getName() + "hello world!");

        }
    }
}
